package org.example.mytask.controller;

import org.apache.ibatis.annotations.Update;
import org.example.mytask.domain.PurchasingContractReview;
import org.example.mytask.service.PurchasingContractReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/mytask/purchasingContract")
public class PurchasingContractReviewController {
    @Autowired
    private PurchasingContractReviewService purchasingContractReviewService;

    @GetMapping("/list")
    public List<PurchasingContractReview> selectList(PurchasingContractReview purchasingContractReview){
        return purchasingContractReviewService.select(purchasingContractReview);
    }
    @GetMapping("/{id}")
    public PurchasingContractReview selectById(@PathVariable int id){
        return purchasingContractReviewService.selectById(id);
    }
    @PutMapping("/update")
    public int update(@RequestBody PurchasingContractReview purchasingContractReview){
        return purchasingContractReviewService.update(purchasingContractReview);
    }
}




















